from bs4 import BeautifulSoup
from timeit import default_timer as timer
from multiprocessing import Process, Lock, Array, Manager
import os
import re
import csv
from sets import Set
import sys

  #Ack
  #print("Ack:")
  Ack = ""
  #ttt = []
  GovIntCENTER_list = soup.find_all("center",text="Government Interests")
  if GovIntCENTER_list:
    start = 0
    num_processed = 0
    for s in GovIntCENTER_list[0].next_siblings:
      if start:
        if s.name == 'hr':
          break
        u_s = unicode(s.string)
        if u_s == "None" or u_s == "\n":
          continue
        if num_processed == 1 and Ack.endswith("\n"):
          Ack = Ack[:-1]
          Ack += '.'
          Ack += ' '
        #ttt.append(u_s)
        Ack += u_s
        num_processed += 1
      elif s.name == 'hr':
        start = 1
    Ack = Ack.replace("\n"," ")
    Ack = re.sub(' +',' ',Ack)
    #if Ack.startswith(' ')
      #Ack = Ack[1:]
  else:
    Ack = "NULL"
  if Ack.startswith(" "):
    Ack = Ack[1:]
  #print(Ack)
  #print(ttt)
 

